package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2025-01-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_mail_account")
public class MailAccountDo extends Model<MailAccountDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "company_id", fill = FieldFill.INSERT)
    private Long companyId;

    @TableField("is_auto_sent")
    private Integer isAutoSent;

    @TableField("port")
    private String port;
    /**
     * 邮箱
     */
    @TableField("mail_no")
    private String mailNo;


    @TableField("user")
    private String user;

    @TableField("default_confirm_template_id")
    private Long  defaultConfirmTemplateId;

    @TableField("default_send_template_id")
    private Long defaultSendTemplateId;
    /**
     * 密钥
     */
    @TableField("password")
    private String password;

    @TableField("smtp")
    private String smtp;

    @TableField("imap")
    private String imap;

    /**
     * 邮箱状态 normal正常 abnormal 不正常
     */
    @TableField("status")
    private String status;

    /**
     * 昵称
     */
    @TableField("nick")
    private String nick;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;

    private Long storeId;

    @TableField("tail_content")
    private String tailContent;

    @TableField("head_content")
    private String headContent;

    @TableField("title")
    private String title;
    @TableField("email_title_type")
    private Integer emailTitleType;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
